<?php
/**
 * Created by PhpStorm.
 * User: longyuanmoqi
 * Date: 2016/11/27
 * Time: 19:31
 */
session_start();
if (isset($_SESSION['userinfo'])){
    $login=true;
    $userinfo=$_SESSION['userinfo'];
}else{
    $login=false;
}
require 'user_html.php';
if(isset($_GET['action']) && $_GET['action']=='logout'){
    unset($_SESSION['userinfo']);
    if(empty($_SESSION))   session_destroy();
    header('Location:login.php');
    die;
}